<template>
	<view class="set">
		<view
			class="list-cell b-b"
			:class="{ 'm-t': item.class === 'mT' }"
			v-for="item in setList"
			:key="item.title"
			@tap="navTo(item.url)"
			hover-class="cell-hover"
			:hover-stay-time="50"
		>
			<text class="cell-tit">{{ item.title }}</text>
			<text class="cell-tip">{{ item.content }}</text>
			<!-- <text class="cell-more iconfont iconyou"></text> -->
			<image src="../../../static/imgs/home/right.png" style="width: 16rpx;height: 26rpx;" mode=""></image>
		</view>

		<!-- <view
			class="list-cell log-out-btn"
			@tap="toLogout"
		>
			<text class="cell-tit">退出登录</text>
		</view> -->
		</view>
	</view>
</template>
<script>
// import { logout } from '@/api/login';
export default {
	data() {
		return {
			
			setList: [
				// {
				// 	title: '个人资料',
				// 	url: '/pages/user/set/info',
				// 	content: ''
				// },
				{
					title: '修改交易密码',
					url: '/pages/index/set/changePayPsd',
					content: ''
				},
				{
					title: '修改登录密码',
					url: '/pages/index/set/edit-password',
					content: ''
				},
			
			],
			is_set_paypwd:''
		};
	},
	onLoad() {
		this.initData();
		// #ifdef APP-PLUS
		if (uni.getSystemInfoSync().platform === 'ios') {
			this.CustomBar = 0;
		}
		// #endif
	},
	methods: {
		// 初始化数据
		initData() {
			
		},
		// 通用跳转
		navTo(route) {
			console.log(route)
			uni.navigateTo({
				url:route
			})
		},
		// 退出登录
		toLogout() {
			uni.showModal({
				content: '确定要退出登录么',
				success: e => {
					if (e.confirm) {
						this.$api.logout().then(res => {
							if(res.code == 1){
								this.$msg(res.msg);
								uni.clearStorage()
								setTimeout(()=>{
									uni.reLaunch({
										url: '/pages/login/login'
									});
								},800)
								
							}
						})
					}
				}
			}); 
		},
		showColorModal() {
			this.colorModal = true;
		},
		// SetColor(item) {
		// 	this.colorModal = false;
		// 	this.themeColor = item;
		// 	this.$mStore.commit('setThemeColor', item);
		// }
	}
};
</script>
<style lang="scss">
// page {
// 	// background: $page-color-base;
// }
.set {
	padding:30rpx 0;
}

.cu-list.card-menu {
	margin:30rpx 0;
	.title {
		margin-left: 30rpx;
	}
}
.list-cell {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: baseline;
    -webkit-align-items: baseline;
    align-items: baseline;
    padding: 10px 15px;
    line-height: 30px;
    position: relative;
    background: #fff;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.list-cell .cell-tit {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    font-size: 15px;
    margin-right: 5px;
}
.list-cell.log-out-btn {
    margin: 20px 0;
}
.list-cell.log-out-btn .cell-tit {
    text-align: center;
    margin-right: 0;
}

.list-cell .cell-tit {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    font-size: 15px;
    margin-right: 5px;
}
</style>
